# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: tinywrkb <tinywrkb@gmail.com>

pkgname=power-profiles-daemon
pkgver=0.13
pkgrel=1
pkgdesc='Makes power profiles handling available over D-Bus'
url='https://gitlab.freedesktop.org/hadess/power-profiles-daemon'
license=(GPL3)
arch=(x86_64)
depends=(upower polkit)
optdepends=('python-gobject: for powerprofilesctl')
makedepends=(meson)
checkdepends=(python-dbusmock python-isort python-mccabe umockdev)
source=(https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/archive/$pkgver/$pkgname-$pkgver.tar.gz)
b2sums=('80dba838433c7abdbc6079a8c6ff330cfda8dc1f0e8b8628125e466987238b1b7912b91af201ff120a2b1b7a5b081824c98d2a7e67a6c81d6ba7eb905d168ce4')

build() {
  meson $pkgname-$pkgver build \
    --prefix /usr \
    --libexec lib \
    --sysconfdir /usr/share
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}
